package Test;

import java.awt.image.BufferedImage;

/**
 * @leiwenkang 2018-02-24 14:58.
 */
public class ThreadPoolExecutorTest2 {
    public static void main(String[] args) throws Exception{
        Thread t = new Thread() {
            @Override
            public void run() {
                String url = "http://t2.a.market.xiaomi.com/download/AdCenter/02b6550970b0436417865be3d18f5c80b6d406954/AdCenter02b6550970b0436417865be3d18f5c80b6d406954.jpg";
                BufferedImage blurredImage = null;
                try {
                    BufferedImage image = ImageHelper.getImage(url);
                    blurredImage = ImageHelper.gaussianBlur(image,
                            AdCommonConst.GaussianBlurConst.GS_RADIUS,
                            AdCommonConst.GaussianBlurConst.GS_RADIUS,
                            AdCommonConst.GaussianBlurConst.GS_KERNEL,
                            AdCommonConst.GaussianBlurConst.CORE_POOL_SIZE);
                } catch (Exception e) {
                    System.out.println(e.getMessage());
                }
                System.out.println(blurredImage);
            }
        };
        t.start();

    }
}
